Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine: refactor rotations to process through job queue #4269

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

mastercactapus
Copy link
Member

Description:
Migrates rotation processing to the job queue. Uses the existing advancement calculation function without any changes to logic.

Notes:

  • Adds an entity_updates table to track changes to rotations via DB trigger as a fallback
  • Adds an event for the updateRotation mutation to schedule a job immediately
  • Adds a once-per-minute periodic job to look for changed rotations
  • Adds an update-rotation job that schedules itself for the next rotation advance
  • Deletes the old 5-sec-polling cycle updates
  • WaitAndAssertOnCallUsers test helper was updated to wait for eventual correctness -- since the job queue needs time to run, previously it only checked once after a single engine cycle.
  • calcAdvance was updated to abort for unknown rotation state versions

Which issue(s) this PR fixes:
Closes #4244

Additional Info:
The previous approach updated all rotations every 5 seconds; this one will update rotations immediately on change and when the individual rotation is meant to advance.

…ersions and return error for unknown versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Rotation Manager to Use the New Job Queue System
2 participants